import { FormProps as AntdFormProps, Form } from 'antd';

interface FormProps extends AntdFormProps {
  children: React.ReactNode;
  className?: string;
}

export const AntdForm = ({ children, className, ...props }: FormProps) => {
  return (
    <div>
      <Form className={`eai-design-form ${className}`} {...props}>
        {children}
      </Form>
    </div>
  );
};

// 导出 Form 的子组件
export const FormItem = Form.Item;
export const FormList = Form.List;
export const FormProvider = Form.Provider;
export const FormErrorList = Form.ErrorList;
export const FormContext = Form.Context;
export const useForm = Form.useForm;
